import { Injectable } from '@angular/core';
import {Observable} from 'rxjs/Observable';
import {MsgResult} from '../../../models/msg-result';
import {RequestUtil} from '../../../util/request-util';
import {FormUtil} from '../../../util/form-util';
import {DataAuditAPI} from '../data-audit-constants';

@Injectable()
export class DataAuditGeneratedService {

  constructor(
    private requestUtil: RequestUtil,
    private formUtil: FormUtil
  ) { }
  getDataGenerated(dataObj): Observable<MsgResult> {
    const params = this.formUtil.serialize(dataObj);
    return this.requestUtil.get(DataAuditAPI.dataGenerated, params);
  }
}
